// eslint-disable prettier/prettier

// 根据 /packages目录下组件生成组件类侧边导航

import {createRouter ,createWebHashHistory,RouterOptions} from 'vue-router';

const routes  =[{{routes}}]

const routerConfig= {
  history: createWebHashHistory(),
  routes,
  scrollBehavior(to:any,from:any){
    if(to.path !== from.path){
      return {top:0}
    }
  }
}

const router = createRouter(routerConfig as RouterOptions)

export default router